/*******************************************************************************
 * Copyright (c) 2012, 2013 XML-Print Project.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     XML-Print Project - initial API and implementation
 ******************************************************************************/
package info.xmlprint.core.format;

import java.util.Comparator;

public class FormatSorter implements Comparator<Format> {

	private String typ;

	public FormatSorter(String typ) {
		this.typ = typ;
	}

	@Override
	public int compare(Format f1, Format f2) {

		if (typ.equals("footnote")) {
			//System.out.println(f1.getName() + " " + f2.getName());
			return (f1.getId().compareToIgnoreCase(f2.getId()));
		}

		return 0;

	}

}
